package org.grow.commodity.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.grow.commodity.entity.CmEntityQueryCondition;
import org.grow.commodity.entity.CommodityEntity;

import java.util.List;


/**
 * @Author: nick
 * @Date: 21-8-6
 */
@Mapper
public interface CommodityEntityDao extends BaseMapper<CommodityEntity> {

    CommodityEntity findByCommodityCode(@Param("cmCode") String commodityCode);
//    List<CommodityEntity> dynamicQuery(@Param("qc")CmEntityQueryCondition qc);
    IPage<CommodityEntity> dynamicQuery(IPage<CommodityEntity> page, @Param("qc")CmEntityQueryCondition qc);

    List<CommodityEntity> findByNameOrCode(@Param("nc") String nameOrCode);
}
